summaryrefslogtreecommitdiff
path: root/src/app/(main)/(home)/posts/[slug]
diff options
context:
space:
mode:
authorBertrand Yuan <189593334+bertyuan@users.noreply.github.com>2026-04-27 15:51:27 +0800
committerGitHub <noreply@github.com>2026-04-27 15:51:27 +0800
commit658798b3a2378bb6df16cfbb16d707c6fb719e1e (patch)
tree63fc32f5f7fda4bbf718f490e3b1640311dbf994 /src/app/(main)/(home)/posts/[slug]
parent8b9c0139a93c8b9d41068e5271d0fc6917d34fab (diff)
parent2e7d98420900e1d6749729ea2a94c334e7d65754 (diff)
Merge pull request #19 from bertyuan/copilot/fix-front-backend-connection
fix: patch rough frontend-backend connection issues
Diffstat (limited to 'src/app/(main)/(home)/posts/[slug]')
-rw-r--r--src/app/(main)/(home)/posts/[slug]/page.client.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/(main)/(home)/posts/[slug]/page.client.tsx b/src/app/(main)/(home)/posts/[slug]/page.client.tsx
index 7a97f56..13dbfeb 100644
--- a/src/app/(main)/(home)/posts/[slug]/page.client.tsx
+++ b/src/app/(main)/(home)/posts/[slug]/page.client.tsx
@@ -7,7 +7,7 @@ import { Icons } from '@/components/icons/icons';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { Comments } from '@fuma-comment/react';
-import { redirect } from 'next/navigation';
+import { useRouter } from 'next/navigation';
import { useRef } from 'react';
import { toast } from 'sonner';
import { useCopyToClipboard } from 'usehooks-ts';
@@ -42,6 +42,7 @@ export function PostComments({
slug,
className,
}: { slug: string; className?: string }) {
+ const router = useRouter();
return (
<Comments
page={slug}
@@ -49,7 +50,7 @@ export function PostComments({
auth={{
type: 'api',
signIn: () => {
- redirect('/login');
+ router.push('/login');
},
}}
/>